<?php
use backend\assets\AgentAsset;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;

AgentAsset::register($this);
?>
<style>
    .itemList .item-name {width: 70px;}
</style>
<div class="hide"><iframe name='send_post' id='send_post'></iframe></div>
<div class="clearing-wrap mt30" style="padding:0 80px 30px 100px;;">
    <?php ActiveForm::begin(['action'=>Url::toRoute(['financial/cashier','action'=>'clearingaction']),'options'=>['target'=>'send_post']]);?>
    <div class="itemList clearfix">
        <label class="item-name">卡扣金额</label>
        <div class="item-txt">
            <input type="text" name="balance_pay">
            <span>余额:<em class="red"><?=$info['member_balance']?></em></span>
        </div>
    </div>
    <div class="itemList clearfix">
        <label class="item-name">扣赠送金额</label>
        <div class="item-txt">
            <input type="text" name="give_balance_pay">
            <span>余额:<em class="red"><?=$info['member_give_balance']?></em></span>
        </div>
    </div>
    <div class="itemList clearfix">
        <label class="item-name">现金支付</label>
        <div class="item-txt">
            <input type="text" name="cash_pay">
        </div>
    </div>
    <div class="itemList clearfix">
        <label class="item-name">刷卡支付</label>
        <div class="item-txt">
            <input type="text" name="union_pay">
            <input type="hidden" name="member_id" value="<?=$info['memberId']?>" />
            <input type="hidden" name="date" />
        </div>
    </div>

    <div class="mt20" style="padding-left: 70px;">
        <ul class="row">
            <li class="pull-left mr30" style="list-style-type: initial;list-style-position: inside;">
                <p>本次购买</p>
                <?php if($info['totalPricebalance']!=''):?><div><span>储值卡：</span><em class="red"><?=$info['totalPricebalance']?></em></div><?php endif;?>
                <?php if($info['totalPricehealth']!=''):?><div><span>疗程卡：</span><em class="red"><?=$info['totalPricehealth']?></em></div><?php endif;?>
                <?php if($info['totalPriceproduct']!=''):?><div><span>家居产品：</span><em class="red"><?=$info['totalPriceproduct']?></em></div><?php endif;?>
                <?php if($info['totalPriceprojects']!=''):?><div><span>合作项目：</span><em class="red"><?=$info['totalPriceprojects']?></em></div><?php endif;?>
                <?php if($info['totalPriceservice']!=''):?><div><span>服务项目：</span><em class="red"><?=$info['totalPriceservice']?></em></div><?php endif;?>
            </li>
            <li class="pull-left" style="margin-left: 30px;list-style-type: initial;list-style-position: inside;">
                <p>总金额：<span class="allMoney"><?=$info['totalPrice']?></span></p>
                <div><span>已支付：</span><em class="red payMoney">0</em></div>
                <div><span>欠款：</span><em class="red repayment"><?=$info['totalPrice']?></em></div>
            </li>
        </ul>
        <div class="mt20">
             <span class="btnBg" style="width: 92px; height: 32px;line-height: 32px;">
			  <input type="submit" value="确定" style="display: inline-block; width: 100%; background: 0; border: 0 ;padding: 0" /></span>
		     <span class="btnBg bg_rest ml20" style="width: 92px; height: 32px;line-height: 32px;">
			 <input type="reset" value="取消"  class="rest" style="display: inline-block; width: 100%; background: 0; border: 0;padding: 0"/></span>
        </div>
    </div>
    <?php ActiveForm::end();?>
</div>

<?php $this->registerJsFile("@web/system/financial/cashier/clearing.js",['position'=>$this::POS_END]);?>